package com.tzxx.spider.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

/**
 * 文章列表爬取爬出来的文章url信息，待爬取文章详情的链接表
 *
 * @author Created by tzxx
 * @since : 2019/7/19.
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table
public class ArticleLink implements Serializable {

    private static final long serialVersionUID = 193118731589573185L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(value = "id",type = IdType.AUTO)//指定自增策略
    private long id;
    @Column
    private String url;
    @Column
    private long templateId;
    @Column
    @Builder.Default
    private Date createTime = new Date();
    @Column
    @Builder.Default
    private Date updateTime = new Date();
}
